<!DOCTYPE html>
<%@ page pageEncoding="UTF-8" isELIgnored="false" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html class="x-admin-sm">

<head>
    <meta charset="UTF-8">
    <title>陪玩个人列表</title>
    <base href="${pageContext.request.contextPath}/">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <link rel="stylesheet" href="css/font.css">
    <link rel="stylesheet" href="./css/xadmin.css">
    <script src="../../../lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="../../../js/xadmin.js"></script>
    <script src="js/jquery.min.js"></script>
    <script>
        $(function () {
            $(".bigImg img ").mouseover(function (e) {
                $("<div id='tip'><img src='"+this.src+"'><br>"+this.alt+"</div>").appendTo("body");
                $("#tip").css({
                    top:e.pageY+10,
                    left:e.pageX+10
                }).show(600);
            }).mousemove(function (e) {
                $("#tip").css({
                    top:e.pageY+10,
                    left:e.pageX+10
                });
            }).mouseout(function () {
                $("#tip").remove();
            })
        })
    </script>

    <style>
        #tip{
            position: absolute;
            border: 1px solid #27d4c9;
            background-color: #27d4c9;
            color: white;
            text-align: center;
            font-size: 1.2rem;
            display: none;
        }
        #tip img{
            height: 300px;
            border: 2px solid #27d4c9;
        }
    </style>
</head>
<body>
<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-body">
                    <table class="layui-table layui-form">
                        <thead>
                        <tr style="background: #27d4c9;">
                            <th>序号</th>
                            <th>昵称</th>
                            <th>星级</th>
                            <th>接单量</th>
                            <th>地点</th>
                            <th>照片</th>
                            <%--<th>个人签名</th>--%>
                            <th>价格/h</th>
                            <th>段位</th>
                            <th>游戏</th>
                            <th>个人详细</th>
                            <th>删除&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;修改</th>
                        </thead>
                        <tbody>
                        <c:forEach var="section" items="${sections}" varStatus="xuan">
                        <tr>
                            <td>${xuan.count}</td>
                            <td>${section.name}</td>
                            <td>${section.level_}</td>
                            <td>${section.order_count}</td>
                            <td>${section.loc}</td>
                            <td class="bigImg"><img src="${initParam.IP}${section.acc_img}" title="${section.name}"
                                     style="width: 80px;height: 60px;"></td>
                            <%--<td>${section.message}</td>--%>
                            <td>${section.price}</td>
                            <td>${section.dan}</td>
                            <td>${section.game_id.title}</td>
                            <td><a href="servlet/Acc_DetailsServiceTypeAction?act=list&id=${section.id}">个人详细</a></td>
                            <td class="td-manage">
                                <a href="servlet/ServiceTypeAction?act=delete&id=${section.id}"
                                   class="lafitewu_look" title="查看" onclick="return confirm('确认删除吗?')">
                                    删除
                                </a>
                                <a href="servlet/ServiceTypeAction?act=update&id=${section.id}"
                                   class="lafitewu_auditing lafitewu_margin_left_20" title="修改">
                                    修改
                                </a>
                                </td>
                        </tr>
                        </c:forEach>
                        </tbody>
                    </table>
                </div>
                    <tr>
                        <td colspan="10" >
                            <c:if test="${page != 1}">
                                <a href="servlet/ServiceTypeAction?act=list&page=1"style="margin-left: 100px">首页</a>
                                <a href="servlet/ServiceTypeAction?act=list&page=${page-1}">上一页</a>
                            </c:if>
                            <c:if test="${page == 1}">
                                <label style="margin-left: 472px">首页</label>
                                <label>上一页</label>
                            </c:if>
                            <a>第${page}页</a>
                            <c:if test="${page != lastpage}">
                                <a href="servlet/ServiceTypeAction?act=list&page=${page+1}">下一页</a>
                                <a href="servlet/ServiceTypeAction?act=list&page=${lastpage}">尾页</a>
                            </c:if>
                            <c:if test="${page == lastpage}">
                                <label>下一页</label>
                                <label>尾页</label>
                            </c:if>
                            <form action="servlet/ServiceTypeAction?act=list" style="display: inline-block">
                                <input name="page" type="number" style="width: 30px">
                                <input type="submit" value="go">
                            </form>
                        </td>
                    </tr>
            </div>
        </div>
    </div>
</div>
</body>


<script>layui.use(['laydate', 'form'],
    function() {
        var laydate = layui.laydate;

        //执行一个laydate实例
        laydate.render({
            elem: '#start' //指定元素
        });

        //执行一个laydate实例
        laydate.render({
            elem: '#end' //指定元素
        });
    });
/*用户-删除*/
function member_del(obj, id) {
    layer.confirm('确认要删除吗？',
        function(index) {
            //发异步删除数据
            $(obj).parents("tr").remove();
            layer.msg('已删除!', {
                icon: 1,
                time: 1000
            });
        });
}

</script>

</html>